package start;

import java.sql.Connection;

import java.sql.SQLException;

import javax.sql.DataSource;

public class Test02 {
    public Test02() throws SQLException {
        com.mysql.jdbc.jdbc2.optional.MysqlDataSource dataSource = new com.mysql.jdbc.jdbc2.optional.MysqlDataSource();
        dataSource.setURL("jdbc:mysql://192.168.1.101:3306/myTest");
        dataSource.setUser("root");
        dataSource.setPassword("2348");
        Connection con = dataSource.getConnection();
        System.out.println(con);
    }
}
